package com.wzz.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @team daydayup
 * @time 2021-12-06 21:45
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Accessors(chain = true)
public class StudyUser implements Serializable {

    @ApiModelProperty(value = "用户id")
    @TableId(type = IdType.AUTO)
    private String userId;

    private Integer zfUserId;

    @ApiModelProperty(value = "用户姓名")
    private String userName;

    @ApiModelProperty(value = "用户编号")
    private String userNumber;

    @ApiModelProperty(value = "用户电话")
    private String userTel;

    @ApiModelProperty(value = "用户密码")
    private String userPassword;

    @ApiModelProperty(value = "学校id(外键)")
    private Long schoolId;

    @ApiModelProperty(value = "学生班级id(外键)")
    private String studentClassId;

    @ApiModelProperty(value = "用户邮箱")
    private String userEmail;

    @ApiModelProperty(value = "用户性别")
    private Integer userGender;

    @ApiModelProperty(value = "用户头像")
    private String userHead;

    @ApiModelProperty(value = "用户权限")
    private Integer userPower;

    @ApiModelProperty(value = "用户封禁标识")
    private Integer isBan;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime gmtCreate;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "修改时间")
    private LocalDateTime gmtModify;

//    @ApiModelProperty("外键绑定的学校类")
//    private School school;
//
//    @ApiModelProperty("外键绑定的班级类")
//    private StudentClass studentClass;

    private String ddToken;

    private static final long serialVersionUID = 1L;
}